
/*
	ParticleBase originally written for ParticlePlayground
	assigment.

	This is a simplified version for CGA class 
	2011 - 2
*/

#ifndef __PARTICLE_BASE_CLASS__
#define __PARTICLE_BASE_CLASS__

#include <stdlib.h>
#include <vector>

#include "GfxLib.hpp"
using namespace GfxLib;

struct PixelBuffer {

	int width, height, bytesPerPix;
	unsigned char * pixels;
};

class ParticleBase {

public:

	ParticleBase(void);
	~ParticleBase(void);

	// function called every frame to control movement
	void Update(float deltaTime);

	 // config particle
	void ConfigParticle(float posX, float posY, float posZ, PixelBuffer *texture);

	// Get life from particle
	inline int GetLife() { return (life); }

private:

	// stores current position of the particle
	float x,y,z; 

	//amount of frames that the particle still have left
	int life;

	// render particle
	void Render();

	PixelBuffer * texture;
};

#endif // __PARTICLE_BASE_CLASS__